package com.example.practical_training_projects.service;


import com.example.practical_training_projects.entity.articles_class;
import com.example.practical_training_projects.mapper.articles_classMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class articles_classServicelmpl implements articles_classService{
@Autowired
private articles_classMapper mapper;

    @Override
    public PageInfo<articles_class> findclasspage(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<articles_class> lists=mapper.getAllclass();
        PageInfo<articles_class> pageInfo=new PageInfo<>(lists);
        return pageInfo;
    }

    @Override
    public List<articles_class> getAllclass() {
        List<articles_class> allclass = mapper.getAllclass();
        return allclass;
    }



    /**@Override
     *
     * @param
     * @return

    public Integer deleteclassbyid(Integer as_uid) {
        return mapper.deleteclassbyid(as_uid);}
     */


    @Override
    public Integer insertclass(articles_class a_cls) {
        return mapper.insertclass(a_cls);
    }

    @Override
    public Integer updateclass(articles_class a_cls) {
        return mapper.updateclass(a_cls);
    }
}
